<html>
  <head>
    <title>Timeline demo</title>

    <style>
      body {font: 10pt arial;}
    </style>

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript" src="../timeline.js"></script>
    <link rel="stylesheet" type="text/css" href="../timeline.css">
    
    <style>
      div.timeline-event-content {
        white-space: normal;
        max-width: 100px;
      }
    </style>
    
    <script type="text/javascript">
      var timeline;
      
      google.load("visualization", "1");
      
      // Set callback to run when API is loaded
      google.setOnLoadCallback(drawVisualization); 

      // Called when the Visualization API is loaded.
      function drawVisualization() {
        // Create and populate a data table.
        var data = new google.visualization.DataTable();
        data.addColumn('datetime', 'start');
        data.addColumn('datetime', 'end');
        data.addColumn('string', 'content');
	
        data.addRows([
          [new Date(2010,7,23), , 'This is a textbox with a lot of text which will spread over multiple lines'],
          [new Date(2010,7,23,23,0,0), , 'This is a textbox with a lot of text which will spread over multiple lines'],
          [new Date(2010,7,24,16,0,0), , 'This is a textbox with a lot of text which will spread over multiple lines'],
          [new Date(2010,7,26), new Date(2010,8,2), 'This is a textbox with a lot of text which will spread over multiple lines'],     
          [new Date(2010,7,28), , 'This is a textbox with a lot of text which will spread over multiple lines'],
          [new Date(2010,7,29), , 'This is a textbox with a lot of text which will spread over multiple lines'],
          [new Date(2010,7,31), new Date(2010,8,3), 'This is a textbox with a lot of text which will spread over multiple lines'],     
          [new Date(2010,8,4,12,0,0), , 'This is a textbox with a lot of text which will spread over multiple lines']
        ]);

        // specify options
        var options = {
          "width":  "100%", 
          "height": "95%", 
          "editable": "true",
          'box': {
            'align': "center" // "left", "center", "right"
          }
        };

        // Instantiate our timeline object.
        timeline = new links.Timeline(document.getElementById('mytimeline'));
        
        // Draw our timeline with the created data and options 
        timeline.draw(data, options);
      }
   </script>
  </head>

  <body>
    <div id="mytimeline"></div>
  </body>
</html>
